home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / t3script.arc / WILDCAT!.SLT < prev   
Text File  |  1990-04-14  |  3KB  |  90 lines

  1. /////////////////////////////////////////////////////////////////////////
  2. //           WILDCAT!.SLT  -  by Terry Robertson (October 1988)        //
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
  4. //                                                                     //
  5. //    SCRIPT TO LOG-ON TO A WILDCAT! SYSTEM including one which uses   //
  6. //    BINKLEYTERM as a "front-end".                                    //
  7. //                                                                     //
  8. //    Please note that this script expects you to have assigned your   //
  9. //    FULL NAME to function key F4. The easiest way to do this is by   //
  10. //    using the FKEY script in this collection.                        //
  11. //                                                                     //
  12. //    In addition, the script is written so that it will abort if you  //
  13. //    have not completed the relevant PASSWORD entry in the Dialling   //
  14. //    Directory.                                                       //
  15. //                                                                     //
  16. //    I have assumed that you want to use the linked scripts CONNECT   //
  17. //    and CAPTURE. If you do not have these or prefer not to use       //
  18. //    them you should "comment out" the two lines starting "call"      //
  19. //    by simply putting "//" before the word "call".                   //
  20. //                                                                     //
  21. /////////////////////////////////////////////////////////////////////////
  22.  
  23. str s[32];
  24. str y[] = ";y";
  25.  
  26. main()
  27.  
  28. {
  29.  int stat;
  30.  int t1,
  31.      t2,
  32.      t3;
  33.  int tmark;
  34.  
  35.  alarm(1);
  36.  
  37.  call("connect", 1);                    // Gives "connect" information by
  38.                                         // calling Connect.slc script
  39.  call("capture", 1);                    // Opens new capture file by calling
  40.                                         // Capture.slc script
  41.  
  42.  if (not _entry_pass)                   // no pass, so didn't recog. board
  43.   {
  44.    prints ("Sorry, I don't know the password for this BBS!");
  45.    return;
  46.   }
  47.  
  48.  t1 = track("Binkley", 1);
  49.  t2 = track("Name?", 1);
  50.  t3 = track("Password:", 1);
  51.  
  52.  tmark = timer_start(1800);             // wait up to 3 minutes for login
  53.  
  54.                                         // answer any logon questions
  55.  while (not time_up(tmark))
  56.   {
  57.    terminal();                          // let Telix process any chars and keys
  58.  
  59.    stat = track_hit(0);                 // see which (if any) track was hit
  60.  
  61.    if (stat == t1)                      // Escape prompt found
  62.     {
  63.      delay(50);
  64.      cputs("^[");                       // Send Escape character
  65.     }
  66.    else if (stat == t2)                 // send name
  67.     {
  68. //     cputs(user_name);
  69.      keyget(0x3e00, 0, s);
  70.      delchrs(s, strlen(s) - 2, strlen(s));
  71.      strcat(s, y);
  72.      cputs(s);
  73.      cputs("^M");
  74.     }
  75.    else if (stat == t3)                 // send password
  76.     {
  77.      cputs(_entry_pass);
  78.      cputs("^M");
  79.      break;                             // done with logon
  80.     }
  81.   }
  82.  
  83.  if (time_up(1))
  84.   prints("Logon failed!");
  85.  
  86.  timer_free(tmark);                     // free timer channel
  87.  track_free(0);                         // and all track channels
  88.                
  89. }
  90.